﻿using System;
using System.Collections.Generic;

using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.ComponentModel;
using System.Windows.Controls;

namespace TagCloudNewsLibrary.Model
{
    public class Story
    {
        private static Brush readStoryColour = new SolidColorBrush(Colors.Gray);

        public string Title { get; set; }
        public List<string> Tags { get; set; }
        public string URL { get; set; }
        public string ShortDate { get; set; }
        public BitmapImage Icon { get; set; }
        public DateTimeOffset PublishDate { get; set; }
        public bool IsRead { get; set; }

        public Brush StoryColour 
        {
            get {
                Color foregroundColor = (Color)Application.Current.Resources["PhoneForegroundColor"];
                return (IsRead ? readStoryColour :new SolidColorBrush( foregroundColor));
            }
        }

    }
}
